package com.github.admin.edu.oauth.server.api.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-24
 */
public class TSysUser implements Serializable {

    private String id;
    private String userid;
    private String lasttime;
    private String locked;
    private String loginip;
    private Integer loginnum;
    private Integer orgid;
    private String password;
    private Integer state;
    private String name;
    private Integer yhsf;

    private TSysOrganization orginzation;

    @JsonIgnore
    private String stateName;

    private String orgname;//部门名称

    public String getOrgname() {
        return orgname;
    }

    public void setOrgname(String orgname) {
        this.orgname = orgname;
    }

    public Integer getOrgid() {
        return orgid;
    }

    public void setOrgid(Integer orgid) {
        this.orgid = orgid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getYhsf() {
        return yhsf;
    }

    public void setYhsf(Integer yhsf) {
        this.yhsf = yhsf;
    }

    public Integer getState() {
        return state;
    }

    public String getStateName() {
        return stateName;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    public TSysOrganization getOrginzation() {
        return orginzation;
    }

    public void setOrginzation(TSysOrganization orginzation) {
        if(null!=orginzation){
            this.orgname=orginzation.getName();
        }
        this.orginzation = orginzation;
    }

    public void setState(Integer state) {
        if(null!=state&&1==state){
            this.stateName="启用";
        }else {
            this.stateName="禁用";
        }
        this.state = state;
    }

    public String getLasttime() {
        return lasttime;
    }

    public void setLasttime(String lasttime) {
        this.lasttime = lasttime;
    }

    public String getLocked() {
        return locked;
    }

    public void setLocked(String locked) {
        this.locked = locked;
    }

    public String getLoginip() {
        return loginip;
    }

    public void setLoginip(String loginip) {
        this.loginip = loginip;
    }

    public Integer getLoginnum() {
        return loginnum;
    }

    public void setLoginnum(Integer loginnum) {
        this.loginnum = loginnum;
    }
}
